/**
 * ADAGPS V3 Website layout script
 * Author: Phan Van Dam
 * Created Date: May 7, 2010
 * Last updated: May 8, 2010
**/
/*
var outerLayout, middleLayout, innerLayout, northWestLayout, outerCenter;

$(document).ready(function () {

	outerLayout = $('body').layout({
		center__paneSelector:	".outer-center"
	,	resizable:				true
	,	minSize:				360
	,	maxSize:				480
	,	west__paneSelector:		".outer-west"
	,	west__size:				360
	,	spacing_open:			8 // ALL panes
	,	spacing_closed:			12 // ALL panes
	,	north__spacing_open:	0
	,	south__spacing_open:	0
	,	center__onresize:		"middleLayout.resizeAll"
	});

	middleLayout = $('div.outer-west').layout({
		center__paneSelector:	".middle-west"
	,	spacing_open:			8  // ALL panes
	,	spacing_closed:			12 // ALL panes
	,	center__onresize:		"innerLayout.resizeAll"
	});

	innerLayout = $('div.middle-west').layout({
		center__paneSelector:	".inner-west"
	,	north__size:			45
	,	south__size:			200
	,	resizable:				false
	,	spacing_open:			0  // ALL panes
	,	spacing_closed:			0  // ALL panes
	,	west__spacing_closed:	12
	,	east__spacing_closed:	12
	,	center__onresize:		function () {CenterReSize();}
	});

	CenterReSize();
});
*/
// TreeView menu
function initNodes(id)
{
    // Do nothing
    return;
	var uls = document.getElementsByTagName("ul");
	var i;
	//alert(uls);
	for(i = 0; i < uls.length; i++)
	{
		if(uls[i].id != "root" && uls[i].id != "")
			uls[i].style.display = "none";
	}

	var node = document.getElementById(id);
	if(node!=null)
		if(node.style.display == "none")
			node.style.display = "block";
				//alert("");
}
function clickNode(id){
	var node = document.getElementById('m_' + id);
	if(node.style.display == "none")
		node.style.display = "block";
	else
		node.style.display = "none";
	return false;
}

function SetHomePage(bIsHome)
{
    $('#tbl-home-support').css('display', (bIsHome ? '' : 'none'));
    $('#tbl-list-down').css('display', (!bIsHome ? '' : 'none'));
    $('#tbl-home-support').css('height', (bIsHome ? 200 : 0));
    $('#tbl-list-down').css('height', (!bIsHome ? 250 : 0));
    $('#maptracking').html('');

    ///Khởi tạo gogle map
    _global.gMap=new GoogleFuncs();
    _global.vMap=new VDBFuncs();

    ////////////////////////////////////////////
    _global.myMap=_global.gMap;


    //_global.myMap.labele= new LabeledMarker();
    _global.gMap.InitMap('maptracking');
    _global.checkMap=0;// 1:VBD truoc,0: google map
    //LabeledMarker.prototype = new GMarker(new GLatLng(0, 0));
    /////////////////////////////////////////
    _global.devTracking=new Devices();
    _global.devReview=new Devices();
    _global.locs=new Locations();
    ///Tao ra mang _global.locs.arrLocation tu database o day
    _global.locs.LoadDB();
    /////////////////////////////////////////////////////////////
     $(document).bind('keydown', _global.devReview.PressKey);
    ////////////////////////////////////////////////////////////////
    // ReSize lai cac cua so cho dung voi kich thuoc that
    _global.CenterReSize();
    //////////////////////////////////////////////
    DetectBrowser();
}